package demo05

import (
	"github.com/rs/zerolog"
	"os"
)

func ZeroLogDemo01() {
	log := zerolog.New(os.Stderr)
	log.Info().Str("content", "Hello world").
		Int("count", 3).
		Msg("ZeroLogDemo01")
	// 添加上下文 (文件名/行号/字符串)
	log = log.With().Caller().Str("foo", "bar").Logger()
	log.Info().Msg("Hello world")
}
